package com.lonely.product.domain.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.lonely.common.core.domain.BaseEntity;
import com.lonely.product.enums.OrderPostFinishingEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;


/**
 * @author 黄志标
 * @date 2025-08-12 09:39
 * @Description: 订单后整表
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@TableName("sys_order_post_finishing")
public class SysOrderPostFinishing extends BaseEntity implements Serializable {

    /**
     * 订单id
     */
    private Long orderId;

    /**
     * 订单编号
     */
    private String produceOrderId;

    /**
     * 后整类型：(1: 后整 2：外发后整)
     *
     * @see OrderPostFinishingEnum.TypeEnum
     */
    private String type;

    /**
     * 工厂id
     */
    private Long factoryId;

    /**
     * 后整开始时间
     */
    private Date postFinishingStartTime;

    /**
     * 后整结束时间
     */
    private Date postFinishingEndTime;

    /**
     * 后整状态 （1：待后整 2：后整中 3：已完工 4：未分单）
     *
     * @see OrderPostFinishingEnum.StatusEnum
     */
    private Integer status;

    /**
     * 开始后整数
     */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Integer startPostFinishingQuantity;

    /**
     * 后整完工数
     */
    private Integer completedPostFinishingQuantity;

}
